import request from '@/utils/request'

// 查询账单明细列表
export function listBillDetail(query) {
  return request({
    url: '/veterinary/billDetail/list',
    method: 'get',
    params: query
  })
}

// 查询账单明细详细
export function getBillDetail(detailId) {
  return request({
    url: '/veterinary/billDetail/' + detailId,
    method: 'get'
  })
}

// 查询账单的所有明细
export function getBillDetailsByBillId(billId) {
  return request({
    url: '/veterinary/billDetail/byBillId/' + billId,
    method: 'get'
  })
}

// 新增账单明细
export function addBillDetail(data) {
  return request({
    url: '/veterinary/billDetail',
    method: 'post',
    data: data
  })
}

// 修改账单明细
export function updateBillDetail(data) {
  return request({
    url: '/veterinary/billDetail',
    method: 'put',
    data: data
  })
}

// 删除账单明细
export function delBillDetail(detailId) {
  return request({
    url: '/veterinary/billDetail/' + detailId,
    method: 'delete'
  })
}